package com.atguigu.gulimall.product.feign;

import com.atguigu.common.to.MemberPriceTo;
import com.atguigu.common.to.SkuFullReductionTo;
import com.atguigu.common.to.SkuLadderTo;
import com.atguigu.common.to.SpuBoundTo;
import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 优惠券服务的远程调用接口
 */
@FeignClient("gulimall-coupon")
public interface CouponFeignService {

    /**
     * 保存商品spu级分设置
     */
    @PostMapping("/coupon/spubounds/save")
    R saveSpuBound(@RequestBody SpuBoundTo spuBoundTo);

    /**
     * 保存商品阶梯价格
     */
    @PostMapping("/coupon/skuladder/save")
    R saveSkuLadder(@RequestBody SkuLadderTo skuLadderTo);

    /**
     * 保存商品满减信息
     */
    @PostMapping("/coupon/skufullreduction/save")
    R saveSkuFullReduction(@RequestBody SkuFullReductionTo skuFullReductionTo);

    /**
     * 批量保存商品会员价格
     */
    @PostMapping("/coupon/memberprice/saveBatch")
    R saveBatchMemberPrice(@RequestBody List<MemberPriceTo> memberPriceToList);

}
